package com.compass.mobile.ui.activity

import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.fragment.app.FragmentTransaction
import com.compass.mobile.R
import com.compass.mobile.databinding.ActivityHomePageBinding
import com.compass.mobile.framework.base.BaseVBActivity
import com.compass.mobile.framework.constant.KEY_CLASSIFY_ID
import com.compass.mobile.framework.constant.KEY_ORDER_ID
import com.compass.mobile.framework.constant.KEY_TYPE
import com.compass.mobile.ui.fragment.CaseDetailsFragment
import com.compass.mobile.ui.fragment.DepartmentFragment

/**
 * Description：科室列表
 * Date:2024/6/3 22:19
 */
class DepartmentFragmentActivity : BaseVBActivity<ActivityHomePageBinding>() {


    companion object {
        fun start(context: Context,comeType:String) {
            val intent = Intent(context, DepartmentFragmentActivity::class.java)
            intent.putExtra(KEY_TYPE, comeType)
            context.startActivity(intent)
        }
    }
    private var comeType: String? = null
    private lateinit var  departmentFragment:DepartmentFragment
    override fun initView(savedInstanceState: Bundle?) {
        comeType = intent.getStringExtra(KEY_TYPE)

        departmentFragment = DepartmentFragment()
        val bundle = Bundle()
        bundle.putString(KEY_TYPE, comeType)
        departmentFragment.arguments = bundle

        val fragmentTransaction: FragmentTransaction = supportFragmentManager.beginTransaction()
        fragmentTransaction.replace(R.id.fragmentContainer, departmentFragment)
        fragmentTransaction.commit()

    }
}
